.class public Lcom/uucun/adsdk/view/OfferwallView;
.super Landroid/webkit/WebView;


# static fields
.field public static final a:Ljava/lang/String;


# instance fields
.field public b:Lcom/uucun/adsdk/OfferActivity;

.field private c:Landroid/os/Handler;

.field private d:Landroid/os/Handler;

.field private e:Ljava/lang/String;

.field private f:J


# direct methods
.method static constructor <clinit>()V
    .locals 1

    const-class v0, Lcom/uucun/adsdk/view/OfferwallView;

    invoke-virtual {v0}, Ljava/lang/Class;->getSimpleName()Ljava/lang/String;

    move-result-object v0

    sput-object v0, Lcom/uucun/adsdk/view/OfferwallView;->a:Ljava/lang/String;

    return-void
.end method

.method public constructor <init>(Landroid/os/Handler;Landroid/content/Context;)V
    .locals 2

    const/4 v0, 0x0

    invoke-direct {p0, p2}, Landroid/webkit/WebView;-><init>(Landroid/content/Context;)V

    iput-object v0, p0, Lcom/uucun/adsdk/view/OfferwallView;->c:Landroid/os/Handler;

    iput-object v0, p0, Lcom/uucun/adsdk/view/OfferwallView;->b:Lcom/uucun/adsdk/OfferActivity;

    iput-object v0, p0, Lcom/uucun/adsdk/view/OfferwallView;->d:Landroid/os/Handler;

    const-string v0, "1"

    iput-object v0, p0, Lcom/uucun/adsdk/view/OfferwallView;->e:Ljava/lang/String;

    const-wide/16 v0, -0x1

    iput-wide v0, p0, Lcom/uucun/adsdk/view/OfferwallView;->f:J

    check-cast p2, Lcom/uucun/adsdk/OfferActivity;

    iput-object p2, p0, Lcom/uucun/adsdk/view/OfferwallView;->b:Lcom/uucun/adsdk/OfferActivity;

    iput-object p1, p0, Lcom/uucun/adsdk/view/OfferwallView;->d:Landroid/os/Handler;

    const/4 v0, 0x0

    invoke-virtual {p0, v0}, Lcom/uucun/adsdk/view/OfferwallView;->clearCache(Z)V

    return-void
.end method

.method static synthetic a(Lcom/uucun/adsdk/view/OfferwallView;J)J
    .locals 0

    iput-wide p1, p0, Lcom/uucun/adsdk/view/OfferwallView;->f:J

    return-wide p1
.end method

.method static synthetic a(Lcom/uucun/adsdk/view/OfferwallView;)V
    .locals 0

    invoke-direct {p0}, Lcom/uucun/adsdk/view/OfferwallView;->c()V

    return-void
.end method

.method static synthetic a(Lcom/uucun/adsdk/view/OfferwallView;Ljava/lang/String;)V
    .locals 0

    invoke-direct {p0, p1}, Lcom/uucun/adsdk/view/OfferwallView;->b(Ljava/lang/String;)V

    return-void
.end method

.method static synthetic b(Lcom/uucun/adsdk/view/OfferwallView;)Landroid/os/Handler;
    .locals 1

    iget-object v0, p0, Lcom/uucun/adsdk/view/OfferwallView;->d:Landroid/os/Handler;

    return-object v0
.end method

.method private b(Ljava/lang/String;)V
    .locals 0

    iput-object p1, p0, Lcom/uucun/adsdk/view/OfferwallView;->e:Ljava/lang/String;

    invoke-virtual {p0}, Lcom/uucun/adsdk/view/OfferwallView;->b()V

    return-void
.end method

.method static synthetic c(Lcom/uucun/adsdk/view/OfferwallView;)J
    .locals 2

    iget-wide v0, p0, Lcom/uucun/adsdk/view/OfferwallView;->f:J

    return-wide v0
.end method

.method private c()V
    .locals 6

    new-instance v2, Lorg/json/JSONObject;

    invoke-direct {v2}, Lorg/json/JSONObject;-><init>()V

    iget-object v0, p0, Lcom/uucun/adsdk/view/OfferwallView;->b:Lcom/uucun/adsdk/OfferActivity;

    invoke-static {v0}, Lcom/uucun/adsdk/d;->c(Landroid/content/Context;)Ljava/util/HashMap;

    move-result-object v3

    :try_start_0
    const-string v0, "app_key"

    invoke-virtual {v3, v0}, Ljava/util/HashMap;->get(Ljava/lang/Object;)Ljava/lang/Object;

    move-result-object v0

    check-cast v0, Ljava/lang/String;

    const-string v1, "imei"

    invoke-virtual {v3, v1}, Ljava/util/HashMap;->get(Ljava/lang/Object;)Ljava/lang/Object;

    move-result-object v1

    check-cast v1, Ljava/lang/String;

    const-string v4, "app_key"

    const-string v5, "app_key"

    invoke-virtual {v3, v5}, Ljava/util/HashMap;->get(Ljava/lang/Object;)Ljava/lang/Object;

    move-result-object v3

    invoke-virtual {v2, v4, v3}, Lorg/json/JSONObject;->put(Ljava/lang/String;Ljava/lang/Object;)Lorg/json/JSONObject;

    const-string v3, "flag"

    const-string v4, "2"

    invoke-virtual {v2, v3, v4}, Lorg/json/JSONObject;->put(Ljava/lang/String;Ljava/lang/Object;)Lorg/json/JSONObject;

    new-instance v3, Ljava/lang/StringBuffer;

    invoke-direct {v3}, Ljava/lang/StringBuffer;-><init>()V

    invoke-virtual {v3, v1}, Ljava/lang/StringBuffer;->append(Ljava/lang/String;)Ljava/lang/StringBuffer;

    const-string v1, "|"

    invoke-virtual {v3, v1}, Ljava/lang/StringBuffer;->append(Ljava/lang/String;)Ljava/lang/StringBuffer;

    const-string v1, "|"

    invoke-virtual {v3, v1}, Ljava/lang/StringBuffer;->append(Ljava/lang/String;)Ljava/lang/StringBuffer;

    invoke-static {}, Lcom/uucun/adsdk/b/c;->a()Ljava/lang/String;

    move-result-object v1

    invoke-virtual {v3, v1}, Ljava/lang/StringBuffer;->append(Ljava/lang/String;)Ljava/lang/StringBuffer;

    invoke-virtual {v3}, Ljava/lang/StringBuffer;->toString()Ljava/lang/String;

    move-result-object v1

    invoke-static {v0, v1}, Lcom/DoEncrypt;->encodecrypt(Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String;

    move-result-object v0

    const-string v1, "valid_key"

    invoke-virtual {v2, v1, v0}, Lorg/json/JSONObject;->put(Ljava/lang/String;Ljava/lang/Object;)Lorg/json/JSONObject;
    :try_end_0
    .catch Ljava/lang/Exception; {:try_start_0 .. :try_end_0} :catch_0

    :goto_0
    new-instance v0, Lcom/uucun/adsdk/c/c;

    iget-object v1, p0, Lcom/uucun/adsdk/view/OfferwallView;->b:Lcom/uucun/adsdk/OfferActivity;

    invoke-static {}, Lcom/uucun/adsdk/b/k;->a()Lcom/uucun/adsdk/b/k;

    move-result-object v3

    iget-object v3, v3, Lcom/uucun/adsdk/b/k;->k:Ljava/lang/String;

    const/4 v4, 0x1

    invoke-direct {v0, v1, v3, v2, v4}, Lcom/uucun/adsdk/c/c;-><init>(Landroid/content/Context;Ljava/lang/String;Lorg/json/JSONObject;Z)V

    invoke-virtual {v0}, Lcom/uucun/adsdk/c/c;->start()V

    return-void

    :catch_0
    move-exception v0

    invoke-virtual {v0}, Ljava/lang/Exception;->printStackTrace()V

    goto :goto_0
.end method

.method private d()V
    .locals 2

    new-instance v0, Lcom/uucun/adsdk/view/OfferwallView$AndroidJs;

    iget-object v1, p0, Lcom/uucun/adsdk/view/OfferwallView;->c:Landroid/os/Handler;

    invoke-direct {v0, v1}, Lcom/uucun/adsdk/view/OfferwallView$AndroidJs;-><init>(Landroid/os/Handler;)V

    const-string v1, "android"

    invoke-virtual {p0, v0, v1}, Lcom/uucun/adsdk/view/OfferwallView;->addJavascriptInterface(Ljava/lang/Object;Ljava/lang/String;)V

    return-void
.end method

.method private e()Landroid/os/Handler;
    .locals 1

    new-instance v0, Lcom/uucun/adsdk/view/d;

    invoke-direct {v0, p0}, Lcom/uucun/adsdk/view/d;-><init>(Lcom/uucun/adsdk/view/OfferwallView;)V

    return-object v0
.end method


# virtual methods
.method public a(Ljava/lang/String;)Lorg/json/JSONObject;
    .locals 4

    iget-object v0, p0, Lcom/uucun/adsdk/view/OfferwallView;->b:Lcom/uucun/adsdk/OfferActivity;

    invoke-static {v0}, Lcom/uucun/adsdk/d;->c(Landroid/content/Context;)Ljava/util/HashMap;

    move-result-object v0

    new-instance v1, Lorg/json/JSONObject;

    invoke-direct {v1}, Lorg/json/JSONObject;-><init>()V

    :try_start_0
    const-string v2, "app_key"

    const-string v3, "app_key"

    invoke-virtual {v0, v3}, Ljava/util/HashMap;->get(Ljava/lang/Object;)Ljava/lang/Object;

    move-result-object v3

    invoke-virtual {v1, v2, v3}, Lorg/json/JSONObject;->put(Ljava/lang/String;Ljava/lang/Object;)Lorg/json/JSONObject;

    const-string v2, "channel_id"

    const-string v3, "channel_id"

    invoke-virtual {v0, v3}, Ljava/util/HashMap;->get(Ljava/lang/Object;)Ljava/lang/Object;

    move-result-object v3

    invoke-virtual {v1, v2, v3}, Lorg/json/JSONObject;->put(Ljava/lang/String;Ljava/lang/Object;)Lorg/json/JSONObject;

    const-string v2, "imei"

    const-string v3, "imei"

    invoke-virtual {v0, v3}, Ljava/util/HashMap;->get(Ljava/lang/Object;)Ljava/lang/Object;

    move-result-object v0

    invoke-virtual {v1, v2, v0}, Lorg/json/JSONObject;->put(Ljava/lang/String;Ljava/lang/Object;)Lorg/json/JSONObject;

    const-string v0, "flag"

    const-string v2, "2"

    invoke-virtual {v1, v0, v2}, Lorg/json/JSONObject;->put(Ljava/lang/String;Ljava/lang/Object;)Lorg/json/JSONObject;

    const-string v0, "page_num"

    invoke-virtual {v1, v0, p1}, Lorg/json/JSONObject;->put(Ljava/lang/String;Ljava/lang/Object;)Lorg/json/JSONObject;
    :try_end_0
    .catch Ljava/lang/Exception; {:try_start_0 .. :try_end_0} :catch_0

    :goto_0
    return-object v1

    :catch_0
    move-exception v0

    invoke-virtual {v0}, Ljava/lang/Exception;->printStackTrace()V

    goto :goto_0
.end method

.method public a()V
    .locals 3

    const/4 v2, 0x0

    invoke-direct {p0}, Lcom/uucun/adsdk/view/OfferwallView;->e()Landroid/os/Handler;

    move-result-object v0

    iput-object v0, p0, Lcom/uucun/adsdk/view/OfferwallView;->c:Landroid/os/Handler;

    invoke-virtual {p0}, Lcom/uucun/adsdk/view/OfferwallView;->getSettings()Landroid/webkit/WebSettings;

    move-result-object v0

    const/4 v1, 0x1

    invoke-virtual {v0, v1}, Landroid/webkit/WebSettings;->setJavaScriptEnabled(Z)V

    invoke-virtual {v0, v2}, Landroid/webkit/WebSettings;->setSupportZoom(Z)V

    invoke-virtual {p0, v2}, Lcom/uucun/adsdk/view/OfferwallView;->setScrollBarStyle(I)V

    invoke-direct {p0}, Lcom/uucun/adsdk/view/OfferwallView;->d()V

    invoke-static {}, Ljava/lang/System;->currentTimeMillis()J

    move-result-wide v0

    iput-wide v0, p0, Lcom/uucun/adsdk/view/OfferwallView;->f:J

    new-instance v0, Lcom/uucun/adsdk/view/a;

    invoke-direct {v0, p0}, Lcom/uucun/adsdk/view/a;-><init>(Lcom/uucun/adsdk/view/OfferwallView;)V

    invoke-virtual {p0, v0}, Lcom/uucun/adsdk/view/OfferwallView;->setWebViewClient(Landroid/webkit/WebViewClient;)V

    new-instance v0, Lcom/uucun/adsdk/view/c;

    invoke-direct {v0, p0}, Lcom/uucun/adsdk/view/c;-><init>(Lcom/uucun/adsdk/view/OfferwallView;)V

    invoke-virtual {p0, v0}, Lcom/uucun/adsdk/view/OfferwallView;->setWebChromeClient(Landroid/webkit/WebChromeClient;)V

    return-void
.end method

.method public a(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)V
    .locals 4

    invoke-static {}, Lcom/uucun/adsdk/a/b;->a()Lcom/uucun/adsdk/a/b;

    move-result-object v0

    invoke-virtual {v0, p2}, Lcom/uucun/adsdk/a/b;->a(Ljava/lang/String;)Z

    move-result v0

    if-eqz v0, :cond_0

    const-string v0, "\u8be5\u4efb\u52a1\u6b63\u5728\u4e0b\u8f7d!"

    iget-object v1, p0, Lcom/uucun/adsdk/view/OfferwallView;->b:Lcom/uucun/adsdk/OfferActivity;

    invoke-static {v0, v1}, Lcom/uucun/adsdk/UUAppConnect;->showToast(Ljava/lang/String;Landroid/content/Context;)V

    :goto_0
    return-void

    :cond_0
    iget-object v0, p0, Lcom/uucun/adsdk/view/OfferwallView;->b:Lcom/uucun/adsdk/OfferActivity;

    invoke-static {v0}, Lcom/uucun/adsdk/d;->c(Landroid/content/Context;)Ljava/util/HashMap;

    move-result-object v0

    new-instance v1, Lorg/json/JSONObject;

    invoke-direct {v1}, Lorg/json/JSONObject;-><init>()V

    :try_start_0
    const-string v2, "ad_id"

    invoke-virtual {v1, v2, p2}, Lorg/json/JSONObject;->put(Ljava/lang/String;Ljava/lang/Object;)Lorg/json/JSONObject;

    const-string v2, "imei"

    const-string v3, "imei"

    invoke-virtual {v0, v3}, Ljava/util/HashMap;->get(Ljava/lang/Object;)Ljava/lang/Object;

    move-result-object v0

    invoke-virtual {v1, v2, v0}, Lorg/json/JSONObject;->put(Ljava/lang/String;Ljava/lang/Object;)Lorg/json/JSONObject;

    const-string v0, "event_type"

    const-string v2, "1"

    invoke-virtual {v1, v0, v2}, Lorg/json/JSONObject;->put(Ljava/lang/String;Ljava/lang/Object;)Lorg/json/JSONObject;

    const-string v0, "flag"

    const-string v2, "2"

    invoke-virtual {v1, v0, v2}, Lorg/json/JSONObject;->put(Ljava/lang/String;Ljava/lang/Object;)Lorg/json/JSONObject;

    const-string v0, "isInstall"

    invoke-virtual {v1, v0, p3}, Lorg/json/JSONObject;->put(Ljava/lang/String;Ljava/lang/Object;)Lorg/json/JSONObject;
    :try_end_0
    .catch Ljava/lang/Exception; {:try_start_0 .. :try_end_0} :catch_0

    :goto_1
    new-instance v0, Lcom/uucun/adsdk/c/b;

    iget-object v2, p0, Lcom/uucun/adsdk/view/OfferwallView;->b:Lcom/uucun/adsdk/OfferActivity;

    invoke-direct {v0, v2, p1, p2}, Lcom/uucun/adsdk/c/b;-><init>(Landroid/content/Context;Ljava/lang/String;Ljava/lang/String;)V

    invoke-static {}, Lcom/uucun/adsdk/a/c;->a()Lcom/uucun/adsdk/a/c;

    move-result-object v2

    invoke-virtual {v2, v0}, Lcom/uucun/adsdk/a/c;->a(Lcom/uucun/adsdk/c/b;)V

    const/4 v2, 0x1

    new-array v2, v2, [Lorg/json/JSONObject;

    const/4 v3, 0x0

    aput-object v1, v2, v3

    invoke-virtual {v0, v2}, Lcom/uucun/adsdk/c/b;->execute([Ljava/lang/Object;)Landroid/os/AsyncTask;

    goto :goto_0

    :catch_0
    move-exception v0

    invoke-virtual {v0}, Ljava/lang/Exception;->printStackTrace()V

    goto :goto_1
.end method

.method public b()V
    .locals 3

    new-instance v0, Landroid/os/Message;

    invoke-direct {v0}, Landroid/os/Message;-><init>()V

    const/4 v1, 0x2

    iput v1, v0, Landroid/os/Message;->what:I

    iget-object v1, p0, Lcom/uucun/adsdk/view/OfferwallView;->d:Landroid/os/Handler;

    invoke-virtual {v1, v0}, Landroid/os/Handler;->sendMessage(Landroid/os/Message;)Z

    iget-object v0, p0, Lcom/uucun/adsdk/view/OfferwallView;->e:Ljava/lang/String;

    invoke-virtual {p0, v0}, Lcom/uucun/adsdk/view/OfferwallView;->a(Ljava/lang/String;)Lorg/json/JSONObject;

    move-result-object v0

    new-instance v1, Ljava/lang/StringBuilder;

    invoke-direct {v1}, Ljava/lang/StringBuilder;-><init>()V

    invoke-static {}, Lcom/uucun/adsdk/b/k;->a()Lcom/uucun/adsdk/b/k;

    move-result-object v2

    iget-object v2, v2, Lcom/uucun/adsdk/b/k;->b:Ljava/lang/String;

    invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v1

    const-string v2, "?"

    invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v1

    const-string v2, "jsonString"

    invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v1

    const-string v2, "="

    invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v1

    invoke-virtual {v0}, Lorg/json/JSONObject;->toString()Ljava/lang/String;

    move-result-object v0

    invoke-virtual {v1, v0}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v0

    invoke-virtual {v0}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v0

    sget-object v1, Lcom/uucun/adsdk/view/OfferwallView;->a:Ljava/lang/String;

    invoke-static {v1, v0}, Lcom/uucun/adsdk/b/h;->c(Ljava/lang/String;Ljava/lang/String;)V

    invoke-virtual {p0, v0}, Lcom/uucun/adsdk/view/OfferwallView;->loadUrl(Ljava/lang/String;)V

    return-void
.end method
